// vueX混入公共函数
import store from "@/store";
export default {
  // created() {
  //   console.log("created-minxin");
  // },
  methods: {
    checkPermission(key) {
      try {
        // return this.$store.state.user.userInfo.roles.points.includes(key)
        return store.state.user.userInfo.roles.points.includes(key);
      } catch (error) {
        // 捕获错误，防止退出登录的时候报错
        console.log(error);
        return false;
      }
    },
    CeShi () {
      console.log('methods里面的方法');
    }
  },
};
